/**
 * 
 */
package com.lmm.test.generate;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

import org.apache.commons.io.IOUtils;

/**
 * @author leiming
 *
 */
public class GenerateNumber {
	private static final String FILE_NAME="number.txt";
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		InputStream in = GenerateNumber.class.getResourceAsStream(FILE_NAME);
		//List<String> lines = FileUtils.readLines(file, "utf-8");
		List<String> lines = null;
		StringBuffer sb = new StringBuffer();
		try {
			 lines = IOUtils.readLines(in, "utf-8");
			 int len = lines.size();
			 for(int i=0;i<len-1;i++){
				 sb.append(lines.get(i)+",");
			 }
			 if(len>1){
				 sb.append(lines.get(len-1));
			 }
			 System.out.println(sb.toString());
		 } catch (IOException e) {

			e.printStackTrace();
		} finally {
				IOUtils.closeQuietly(in);
		}
	}

}
